package com.wooboo.server.ext.action.ad;

import redis.clients.jedis.Jedis;

import java.util.Date;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.wooboo.dsp.redis.util.RedisClient;
import com.wooboo.server.ext.ActionBase;
import com.wooboo.server.ext.ApiError;
import com.wooboo.server.ext.Logger;
import com.wooboo.server.ext.Result;
import com.wooboo.server.ext.action.redis.Push;
import com.wooboo.server.ext.data.AdMonitor;
import com.wooboo.server.ext.data.ConFlow;
import com.wooboo.server.ext.service.DbService;
import com.wooboo.server.ext.util.DateUtil;
import com.wooboo.server.ext.util.Parameters;
import com.wooboo.server.ext.util.StringUtil;
import com.wooboo.server.ext.util.controller.MonitorUtil;
/**
 * 
 * 流量监控
 * 	计划总预算
 * 	组天预算
 * 		注意：第二天凌晨的清空天的中间累计值
 * @author wangff
 *
 */
public class Tolimit extends ActionBase{

	
	@Override
	public void initParameters(Parameters params) throws ApiError {
		
	}

	@Override
	public Result invokeService() throws ApiError {
		Result result = new Result();
		String date = DateUtil.getFormatDate(new Date(), "yyyyMMdd");
		Integer count = MonitorUtil.monitor2db(date);
		result.put("count", count);
		return result;
	}
	
	
}
